package com.yy.wga.common.util.config;

import com.yy.wga.common.util.aop.DistributedLockAspect;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;

/**
 * 分布式锁配置
 * @author lgw
 */
@SpringBootConfiguration
@ConditionalOnClass(Aspect.class)
public class DistributedLockConfig {

    @Bean
    public DistributedLockAspect distributedLockAspect() {
        return new DistributedLockAspect();
    }
}
